package com.agentai.framework.datasource;

import com.agentai.framework.security.crypto.Sm2Util;
import com.zaxxer.hikari.HikariDataSource;
import lombok.extern.slf4j.Slf4j;


@Slf4j
public class EnPwdDataSource extends HikariDataSource {

    @Override
    public String getPassword() {

        //得到application.properties中的密文密码
        String password = super.getPassword();
//        System.out.println("--------- "+password);
//        System.out.println("--------- "+Sm2Util.decrypt(password));
        return Sm2Util.decrypt(password);
    }
}
